package org.whuims.pois.model;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.Id;

/**
 * Created by asus on 2014/7/9.
 */
@Entity
@javax.persistence.Table(name = "paper", schema = "", catalog = "pois")
public class PaperEntity extends ActionForm {
    private long id;

    @Id
    @javax.persistence.Column(name = "id")
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    private String ptype;

    @Basic
    @javax.persistence.Column(name = "ptype")
    public String getPtype() {
        return ptype;
    }

    public void setPtype(String ptype) {
        this.ptype = ptype;
    }

    private String pauthor;

    @Basic
    @javax.persistence.Column(name = "pauthor")
    public String getPauthor() {
        return pauthor;
    }

    public void setPauthor(String pauthor) {
        this.pauthor = pauthor;
    }

    private String pauthorEn;

    @Basic
    @javax.persistence.Column(name = "pauthor_en")
    public String getPauthorEn() {
        return pauthorEn;
    }

    public void setPauthorEn(String pauthorEn) {
        this.pauthorEn = pauthorEn;
    }

    private Integer pyear;

    @Basic
    @javax.persistence.Column(name = "pyear")
    public Integer getPyear() {
        return pyear;
    }

    public void setPyear(Integer pyear) {
        this.pyear = pyear;
    }

    private String ptitle;

    @Basic
    @javax.persistence.Column(name = "ptitle")
    public String getPtitle() {
        return ptitle;
    }

    public void setPtitle(String ptitle) {
        this.ptitle = ptitle;
    }

    private String ptitleEn;

    @Basic
    @javax.persistence.Column(name = "ptitle_en")
    public String getPtitleEn() {
        return ptitleEn;
    }

    public void setPtitleEn(String ptitleEn) {
        this.ptitleEn = ptitleEn;
    }

    private String plink;

    @Basic
    @javax.persistence.Column(name = "plink")
    public String getPlink() {
        return plink;
    }

    public void setPlink(String plink) {
        this.plink = plink;
    }

    private String psecondauthor;

    @Basic
    @javax.persistence.Column(name = "psecondauthor")
    public String getPsecondauthor() {
        return psecondauthor;
    }

    public void setPsecondauthor(String psecondauthor) {
        this.psecondauthor = psecondauthor;
    }

    private String psecondtitle;

    @Basic
    @javax.persistence.Column(name = "psecondtitle")
    public String getPsecondtitle() {
        return psecondtitle;
    }

    public void setPsecondtitle(String psecondtitle) {
        this.psecondtitle = psecondtitle;
    }

    private String ppublisherAddress;

    @Basic
    @javax.persistence.Column(name = "ppublisher_address")
    public String getPpublisherAddress() {
        return ppublisherAddress;
    }

    public void setPpublisherAddress(String ppublisherAddress) {
        this.ppublisherAddress = ppublisherAddress;
    }

    private String ppublisher;

    @Basic
    @javax.persistence.Column(name = "ppublisher")
    public String getPpublisher() {
        return ppublisher;
    }

    public void setPpublisher(String ppublisher) {
        this.ppublisher = ppublisher;
    }

    private String pjournal;

    @Basic
    @javax.persistence.Column(name = "pjournal")
    public String getPjournal() {
        return pjournal;
    }

    public void setPjournal(String pjournal) {
        this.pjournal = pjournal;
    }

    private Integer pvolume;

    @Basic
    @javax.persistence.Column(name = "pvolume")
    public Integer getPvolume() {
        return pvolume;
    }

    public void setPvolume(Integer pvolume) {
        this.pvolume = pvolume;
    }

    private String pnumber;

    @Basic
    @javax.persistence.Column(name = "pnumber")
    public String getPnumber() {
        return pnumber;
    }

    public void setPnumber(String pnumber) {
        this.pnumber = pnumber;
    }

    private String ppage;

    @Basic
    @javax.persistence.Column(name = "ppage")
    public String getPpage() {
        return ppage;
    }

    public void setPpage(String ppage) {
        this.ppage = ppage;
    }

    private String pthirdauthor;

    @Basic
    @javax.persistence.Column(name = "pthirdauthor")
    public String getPthirdauthor() {
        return pthirdauthor;
    }

    public void setPthirdauthor(String pthirdauthor) {
        this.pthirdauthor = pthirdauthor;
    }

    private String pthirdtitle;

    @Basic
    @javax.persistence.Column(name = "pthirdtitle")
    public String getPthirdtitle() {
        return pthirdtitle;
    }

    public void setPthirdtitle(String pthirdtitle) {
        this.pthirdtitle = pthirdtitle;
    }

    private Integer pcitednum;

    @Basic
    @javax.persistence.Column(name = "pcitednum")
    public Integer getPcitednum() {
        return pcitednum;
    }

    public void setPcitednum(Integer pcitednum) {
        this.pcitednum = pcitednum;
    }

    private Integer preferencenum;

    @Basic
    @javax.persistence.Column(name = "preferencenum")
    public Integer getPreferencenum() {
        return preferencenum;
    }

    public void setPreferencenum(Integer preferencenum) {
        this.preferencenum = preferencenum;
    }

    private String preferences;

    @Basic
    @javax.persistence.Column(name = "preferences")
    public String getPreferences() {
        return preferences;
    }

    public void setPreferences(String preferences) {
        this.preferences = preferences;
    }

    private String pversion;

    @Basic
    @javax.persistence.Column(name = "pversion")
    public String getPversion() {
        return pversion;
    }

    public void setPversion(String pversion) {
        this.pversion = pversion;
    }

    private String pdoi;

    @Basic
    @javax.persistence.Column(name = "pdoi")
    public String getPdoi() {
        return pdoi;
    }

    public void setPdoi(String pdoi) {
        this.pdoi = pdoi;
    }

    private String pisbn;

    @Basic
    @javax.persistence.Column(name = "pisbn")
    public String getPisbn() {
        return pisbn;
    }

    public void setPisbn(String pisbn) {
        this.pisbn = pisbn;
    }

    private String pkeywords;

    @Basic
    @javax.persistence.Column(name = "pkeywords")
    public String getPkeywords() {
        return pkeywords;
    }

    public void setPkeywords(String pkeywords) {
        this.pkeywords = pkeywords;
    }

    private String pkeywordsEn;

    @Basic
    @javax.persistence.Column(name = "pkeywords_en")
    public String getPkeywordsEn() {
        return pkeywordsEn;
    }

    public void setPkeywordsEn(String pkeywordsEn) {
        this.pkeywordsEn = pkeywordsEn;
    }

    private String pabstract;

    @Basic
    @javax.persistence.Column(name = "pabstract")
    public String getPabstract() {
        return pabstract;
    }

    public void setPabstract(String pabstract) {
        this.pabstract = pabstract;
    }

    private String pabstractEn;

    @Basic
    @javax.persistence.Column(name = "pabstract_en")
    public String getPabstractEn() {
        return pabstractEn;
    }

    public void setPabstractEn(String pabstractEn) {
        this.pabstractEn = pabstractEn;
    }

    private String pauthorOrgan;

    @Basic
    @javax.persistence.Column(name = "pauthor_organ")
    public String getPauthorOrgan() {
        return pauthorOrgan;
    }

    public void setPauthorOrgan(String pauthorOrgan) {
        this.pauthorOrgan = pauthorOrgan;
    }

    private String pauthorAddress;

    @Basic
    @javax.persistence.Column(name = "pauthor_address")
    public String getPauthorAddress() {
        return pauthorAddress;
    }

    public void setPauthorAddress(String pauthorAddress) {
        this.pauthorAddress = pauthorAddress;
    }

    private String pprovider;

    @Basic
    @javax.persistence.Column(name = "pprovider")
    public String getPprovider() {
        return pprovider;
    }

    public void setPprovider(String pprovider) {
        this.pprovider = pprovider;
    }

    private String planguage;

    @Basic
    @javax.persistence.Column(name = "planguage")
    public String getPlanguage() {
        return planguage;
    }

    public void setPlanguage(String planguage) {
        this.planguage = planguage;
    }

    private String preadDate;

    @Basic
    @javax.persistence.Column(name = "pread_date")
    public String getPreadDate() {
        return preadDate;
    }

    public void setPreadDate(String preadDate) {
        this.preadDate = preadDate;
    }

    private String pcreateDate;

    @Basic
    @javax.persistence.Column(name = "pcreate_date")
    public String getPcreateDate() {
        return pcreateDate;
    }

    public void setPcreateDate(String pcreateDate) {
        this.pcreateDate = pcreateDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        PaperEntity that = (PaperEntity) o;

        if (id != that.id) return false;
        if (pabstract != null ? !pabstract.equals(that.pabstract) : that.pabstract != null) return false;
        if (pabstractEn != null ? !pabstractEn.equals(that.pabstractEn) : that.pabstractEn != null) return false;
        if (pauthor != null ? !pauthor.equals(that.pauthor) : that.pauthor != null) return false;
        if (pauthorAddress != null ? !pauthorAddress.equals(that.pauthorAddress) : that.pauthorAddress != null)
            return false;
        if (pauthorEn != null ? !pauthorEn.equals(that.pauthorEn) : that.pauthorEn != null) return false;
        if (pauthorOrgan != null ? !pauthorOrgan.equals(that.pauthorOrgan) : that.pauthorOrgan != null) return false;
        if (pcitednum != null ? !pcitednum.equals(that.pcitednum) : that.pcitednum != null) return false;
        if (pcreateDate != null ? !pcreateDate.equals(that.pcreateDate) : that.pcreateDate != null) return false;
        if (pdoi != null ? !pdoi.equals(that.pdoi) : that.pdoi != null) return false;
        if (pisbn != null ? !pisbn.equals(that.pisbn) : that.pisbn != null) return false;
        if (pjournal != null ? !pjournal.equals(that.pjournal) : that.pjournal != null) return false;
        if (pkeywords != null ? !pkeywords.equals(that.pkeywords) : that.pkeywords != null) return false;
        if (pkeywordsEn != null ? !pkeywordsEn.equals(that.pkeywordsEn) : that.pkeywordsEn != null) return false;
        if (planguage != null ? !planguage.equals(that.planguage) : that.planguage != null) return false;
        if (plink != null ? !plink.equals(that.plink) : that.plink != null) return false;
        if (pnumber != null ? !pnumber.equals(that.pnumber) : that.pnumber != null) return false;
        if (ppage != null ? !ppage.equals(that.ppage) : that.ppage != null) return false;
        if (pprovider != null ? !pprovider.equals(that.pprovider) : that.pprovider != null) return false;
        if (ppublisher != null ? !ppublisher.equals(that.ppublisher) : that.ppublisher != null) return false;
        if (ppublisherAddress != null ? !ppublisherAddress.equals(that.ppublisherAddress) : that.ppublisherAddress != null)
            return false;
        if (preadDate != null ? !preadDate.equals(that.preadDate) : that.preadDate != null) return false;
        if (preferencenum != null ? !preferencenum.equals(that.preferencenum) : that.preferencenum != null)
            return false;
        if (preferences != null ? !preferences.equals(that.preferences) : that.preferences != null) return false;
        if (psecondauthor != null ? !psecondauthor.equals(that.psecondauthor) : that.psecondauthor != null)
            return false;
        if (psecondtitle != null ? !psecondtitle.equals(that.psecondtitle) : that.psecondtitle != null) return false;
        if (pthirdauthor != null ? !pthirdauthor.equals(that.pthirdauthor) : that.pthirdauthor != null) return false;
        if (pthirdtitle != null ? !pthirdtitle.equals(that.pthirdtitle) : that.pthirdtitle != null) return false;
        if (ptitle != null ? !ptitle.equals(that.ptitle) : that.ptitle != null) return false;
        if (ptitleEn != null ? !ptitleEn.equals(that.ptitleEn) : that.ptitleEn != null) return false;
        if (ptype != null ? !ptype.equals(that.ptype) : that.ptype != null) return false;
        if (pversion != null ? !pversion.equals(that.pversion) : that.pversion != null) return false;
        if (pvolume != null ? !pvolume.equals(that.pvolume) : that.pvolume != null) return false;
        if (pyear != null ? !pyear.equals(that.pyear) : that.pyear != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (id ^ (id >>> 32));
        result = 31 * result + (ptype != null ? ptype.hashCode() : 0);
        result = 31 * result + (pauthor != null ? pauthor.hashCode() : 0);
        result = 31 * result + (pauthorEn != null ? pauthorEn.hashCode() : 0);
        result = 31 * result + (pyear != null ? pyear.hashCode() : 0);
        result = 31 * result + (ptitle != null ? ptitle.hashCode() : 0);
        result = 31 * result + (ptitleEn != null ? ptitleEn.hashCode() : 0);
        result = 31 * result + (plink != null ? plink.hashCode() : 0);
        result = 31 * result + (psecondauthor != null ? psecondauthor.hashCode() : 0);
        result = 31 * result + (psecondtitle != null ? psecondtitle.hashCode() : 0);
        result = 31 * result + (ppublisherAddress != null ? ppublisherAddress.hashCode() : 0);
        result = 31 * result + (ppublisher != null ? ppublisher.hashCode() : 0);
        result = 31 * result + (pjournal != null ? pjournal.hashCode() : 0);
        result = 31 * result + (pvolume != null ? pvolume.hashCode() : 0);
        result = 31 * result + (pnumber != null ? pnumber.hashCode() : 0);
        result = 31 * result + (ppage != null ? ppage.hashCode() : 0);
        result = 31 * result + (pthirdauthor != null ? pthirdauthor.hashCode() : 0);
        result = 31 * result + (pthirdtitle != null ? pthirdtitle.hashCode() : 0);
        result = 31 * result + (pcitednum != null ? pcitednum.hashCode() : 0);
        result = 31 * result + (preferencenum != null ? preferencenum.hashCode() : 0);
        result = 31 * result + (preferences != null ? preferences.hashCode() : 0);
        result = 31 * result + (pversion != null ? pversion.hashCode() : 0);
        result = 31 * result + (pdoi != null ? pdoi.hashCode() : 0);
        result = 31 * result + (pisbn != null ? pisbn.hashCode() : 0);
        result = 31 * result + (pkeywords != null ? pkeywords.hashCode() : 0);
        result = 31 * result + (pkeywordsEn != null ? pkeywordsEn.hashCode() : 0);
        result = 31 * result + (pabstract != null ? pabstract.hashCode() : 0);
        result = 31 * result + (pabstractEn != null ? pabstractEn.hashCode() : 0);
        result = 31 * result + (pauthorOrgan != null ? pauthorOrgan.hashCode() : 0);
        result = 31 * result + (pauthorAddress != null ? pauthorAddress.hashCode() : 0);
        result = 31 * result + (pprovider != null ? pprovider.hashCode() : 0);
        result = 31 * result + (planguage != null ? planguage.hashCode() : 0);
        result = 31 * result + (preadDate != null ? preadDate.hashCode() : 0);
        result = 31 * result + (pcreateDate != null ? pcreateDate.hashCode() : 0);
        return result;
    }
}
